updating oE set_keycodes

set_keycodes

include console.e 
namespace console 
public function set_keycodes(object kcfile) 

changes the default codes returned by the keyboard.

Parameters:
  1. kcfile : Either the name of a text file or the handle of an opened (for reading) text file.
Returns:

An integer,

  • 0 means no error.
  • -1 means that the supplied file could not me loaded in to a map.
  • -2 means that a new key value was not an integer.
  • -3 means that an unknown key name was found in the file.
Comments:

The text file is expected to contain bindings for one or more keyboard codes.

The format of the files is a set of lines, one line per key binding, in the form KEYNAME = NEWVALUE. The KEYNAME is the same as the constants but without the "KC_" prefix. The key bindings can be in any order.

Example 1:

-- doskeys.txt file containing some key bindings 
F1 = 260 
F2 = 261 
INSERT = 456 

  set_keycodes( "doskeys.txt" ) 
See Also:

key_codes

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu